import { post, get } from '../../../request.js'

/**
 * 查询所有元素
 * @param {*} params
 * @returns
 */
export const listFileConfig = params => {
    return post({
        url: '/tool/file/config/pageList',
        params,
        loading: true
    })
}

/**
 * 保存配置
 * @param {*} params
 * @returns
 */
export const saveFileConfig = params => {
    return post({
        url: '/tool/file/config/save',
        params,
        loading: true
    })
}

/**
 * 更新配置
 * @param {*} params
 * @returns
 */
export const updateFileConfig = params => {
    return post({
        url: '/tool/file/config/update',
        params,
        loading: true
    })
}

/**
 * 设置为master
 * @param {*} params
 * @returns
 */
export const updateFileConfigMaster = params => {
    return get({
        url: '/tool/file/config/updateFileConfigMaster',
        params,
        loading: true
    })
}

/**
 * 删除
 * @param {*} params
 * @returns
 */
export const deleteFileConfig = params => {
    return get({
        url: '/tool/file/config/deleteFileConfig',
        params,
        loading: true
    })
}

/**
 * 测试文件
 * @param {*} params
 * @returns
 */
export const testFileConfig = params => {
    return get({
        url: '/tool/file/config/testFileConfig',
        params,
        loading: true
    })
}
